let express=require('express')
let fs =require("fs")
let path =require("path")
let getImgApp=express()

getImgApp.get("/:imgName",(req,res)=>{
    console.log(" qingqiuutpian ")
    res.setHeader("Content-Type",'image/*')
    fs.createReadStream(path.resolve(__dirname,`../storage/images/${req.params.imgName}`)).pipe(res)


})

module.exports={
    getImgApp
}